import { FC, useEffect } from 'react';
import SimpleList from '@/components/SimpleList';
import { useModel } from 'umi';

const columns: any[] = [
  {
    title: '网站名称',
    dataIndex: 'X001',
    width: 165,
  },
  {
    title: '网站域名',
    dataIndex: 'X002',
    width: 165,
  },
  {
    title: '网站负责人',
    dataIndex: 'X003',
    width: 230,
  },
  {
    title: '网站许可证号',
    dataIndex: 'X004',
    width: 225,
  },
];

const WebsiteCopyright: FC = () => {
  const { website, getWebsite } = useModel('company');
  useEffect(() => {
    const id = window.sessionStorage.getItem('companyId') || '';
    getWebsite({ id });
  }, []);
  return (
    <SimpleList
      width={848}
      height={220}
      columns={columns}
      dataSource={website}
      headerStyle={{
        height: 42,
        backgroundColor: 'rgba(141, 141, 141, 0.1)',
      }}
      rowStyle={{
        height: 42,
      }}
      sortStyle={{
        width: 88,
      }}
      hover
      odd
      rowBackground
    />
  );
};
export default WebsiteCopyright;
